import type { RouteRecordRaw } from 'vue-router'

const routes: RouteRecordRaw[] = [
  {
    path: '/dev-tools',
    name: 'DevTools',
    component: () => import('./views/index.vue'),
    meta: {
      title: '开发工具'
    },
    children: [
      {
        path: '',
        redirect: '/dev-tools/json'
      },
      {
        path: 'json',
        name: 'JsonTool',
        component: () => import('./views/json-tool.vue'),
        meta: {
          title: 'JSON工具'
        }
      },
      {
        path: 'time',
        name: 'TimeTool',
        component: () => import('./views/time-tool.vue'),
        meta: {
          title: '时间工具'
        }
      }
    ]
  }
]

export default routes